function exec() {
    return new Promise((resolve, reject) => {
        if (1 == 2) {

            resolve("ok")
        } else {
            reject("no");
            // throw new Error("errs1");
            // 
        }
    })
}

async function show() {
    var result = await exec().catch((err) => {
        console.log(err.message)
    });
    console.log(result)
}

// show();



let pro = function () {
    return new Promise((resolve, reject) => {
        reject('err')
    })
}

let sync = async function () {
    let awaitResult = await pro().catch(function (err) {
        console.log(err);
    })
    // console.log(awaitResult)
}

sync()